#import <Foundation/Foundation.h>
#import <gtk/gtk.h>

int main(int argc,char **argv){
	GtkWidget *window;
	GtkWidget *vbox;
	GtkWidget *menu_bar;
	GtkWidget *file_menu;
	GtkWidget *file;
	GtkWidget *quit;

	gtk_init(&argc,&argv);
	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
	gtk_window_set_default_size(GTK_WINDOW(window),250,200);
	gtk_window_set_title(GTK_WINDOW(window),"menu");
	vbox = gtk_vbox_new(FALSE,0);
	gtk_container_add(GTK_CONTAINER(window),vbox);
	menu_bar = gtk_menu_bar_new();
	file_menu = gtk_menu_new();
	file = gtk_menu_item_new_with_label("File");
	quit = gtk_menu_item_new_with_label("Quit");
	gtk_menu_item_set_submenu(GTK_MENU_ITEM(file),file_menu);
	gtk_menu_shell_append(GTK_MENU_SHELL(file_menu),quit);
	gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar),file);
	gtk_box_pack_start(GTK_BOX(vbox),menu_bar,FALSE,FALSE,3);

	g_signal_connect_swapped(G_OBJECT(window),"destroy",G_CALLBACK(gtk_main_quit),
		NULL);
	g_signal_connect(G_OBJECT(quit),"activate",G_CALLBACK(gtk_main_quit),NULL);
	gtk_widget_show_all(window);
	gtk_main();

	return 0;
}